#!/bin/bash
#gitlab的备份脚本

GITLAB_DATA=/data/gitlab/data/backups
GITLAB_DOCKER_NAME=gitlab
backup_gitlab(){
        docker exec -it $GITLAB_DOCKER_NAME  bash -c "gitlab-rake gitlab:backup:create"
        find $GITLAB_DATA -mtime +30 -name "*gitlab_backup.tar" -exec rm -rf {} \;

}
restore_gitlab(){
        echo "导入gitlab"


}

main(){
        backup_gitlab


}


main
